from PySide6.QtWidgets import *
from PySide6.QtCore import *
from PySide6.QtGui import *
from ui.user_widget_ui import Ui_MainWindow
import sys
from UIFuctions import UIFunctions

class User(QMainWindow):
    def __init__(self, parent=None):
        super(User, self).__init__(parent)
        self.setWindowFlags(Qt.FramelessWindowHint)  # 隐藏边框
        self.setAttribute(Qt.WA_TranslucentBackground)  # 背景透明
        self.setWindowOpacity(0.9)  # 窗口透明度
        self.ui = Ui_MainWindow()
        self.ui.setupUi(self)
        self.ui_functions = UIFunctions(self)
        self.ui_functions.enable_dragging()

if __name__ == '__main__':
    app = QApplication(sys.argv)
    window = User()
    window.show()
    sys.exit(app.exec())
    